import request from '@/utils/request'


export function hiddenDangerList(data) { //隐患管理-列表
    return request({
        url: '/project-quality/api/hiddenDanger/page',
        method: 'post',
        data
    })
}
export function hiddenDangerAdd(data) { //隐患管理-添加
    return request({
        url: '/project-quality/api/hiddenDanger/save',
        method: 'POST',
        data
    })
}
//原 put
export function hiddenDangerEdit(data) { //隐患管理-修改
    return request({
        url: '/project-quality/api/hiddenDanger/put/update',
        method: 'post',
        data
    })
}
export function hiddenDangerDetail(id) { //隐患管理-单条查询
    return request({
        url: '/project-quality/api/hiddenDanger/'+id,
        method: 'get',
    })
}
//原 del 
export function hiddenDangerDelete(data) { //隐患管理-单条查询删除
    return request({
        url: '/project-quality/api/hiddenDanger/del/delete',
        method: 'post',
        data
    })
}
export function hiddenDangerallTree() { //隐患管理-获取所有设施设备树
    return request({
        url: '/project-quality/api/equipmentInfo/allTree',
        method: 'get',
    })
}



export function hiddenDangerFormList(data) { //隐患跟踪-分页查询
    return request({
        url: '/project-quality/api/hiddenDanger/track/page',
        method: 'post',
        data
    })
}
export function hiddenDangerApprovalList(data) { //隐患审批-分页查询
    return request({
        url: '/project-quality/api/danger/audit/page',
        method: 'post',
        data
    })
}
export function hiddenDangerCommit(data) { //隐患管理-提交审核
    return request({
        url: '/project-quality/api/danger/audit/commit',
        method: 'post',
        data
    })
}
export function hiddenDangerAudit(data) { //隐患审批-审批
    return request({
        url: '/project-quality/api/danger/audit/audit',
        method: 'post',
        data
    })
}
export function hiddenDangerMap(id) { //隐患审批-流程图
    return request({
        url: '/project-quality/api/danger/audit/'+id,
        method: 'get',
    })
}
export function hiddenDangerApp(data) { //隐患审批-审核饼编辑
    return request({
        url: '/project-quality/api/hiddenDanger/put/audit',
        method: 'post',
        data,
    })
}

export function hiddenDangerDetailsByEdis(params) { //隐患管理-通过edis编码获取详细信息
    return request({
      url: '/project-quality/api/hiddenDanger/edis',
      method: 'GET',
      params
    })
  }
export function hiddenDangerDeExport(data) { //导出
  return request({
    url: '/project-quality/api/hiddenDanger/export',
    responseType: 'arraybuffer',
    method: 'POST',
    data,
  })
}
export function hiddenDangerDeshangbaoExport(data) { //上报导出
  return request({
    url: '/project-quality/api/hiddenDanger/report/export',
    responseType: 'arraybuffer',
    method: 'POST',
    data,
  })
}




export function hiddenDangerRecall(data) { //隐患审批-撤回
    return request({
        url: '/project-quality/api/danger/audit/recall',
        method: 'post',
        data,
    })
}

export function hiddenDangerDeExportx(id) { //申请表
  return request({
    url: '/project-quality/api/hiddenDanger/export/pdf/'+id,
    responseType: 'arraybuffer',
    method: 'get',
  })
}

export function hiddenDangerProssAll(data) { //隐患审批-查询所有审批流程
    return request({
        url: '/project-quality/api/danger/process/process',
        method: 'post',
        data,
    })
}